1. Field of the Invention
The present invention relates to an imaging apparatus, image processing method for the imaging apparatus, and a program which are suitable for correcting a distortion of an image obtained through shooting of an object like an original.
2. Description of the Related Art
Recently has been used an imaging apparatus, which shoots an original or the like placed by a user on a stage on which an object is to be placed. An imaging apparatus, which performs image processing on an obtained image, and outputs image data undergone the image processing to an output device like a projector, thereby projecting the image on a screen.
For example, Unexamined Japanese patent Application KOKAI Publication No. 2002-354331 discloses an imaging apparatus which shoots an original from an oblique direction, and corrects the distortion of an obtained image. In the imaging processing apparatus, as shown in FIGS. 27A and 27B, the pole brace 52 is movable so as to change the direction of the camera section 51. For example, as shown in FIG. 27A, when the camera section 51 is provided directly overhead eth original stage 53, and an original like a piece of paper placed on the original stage 53 is shot by the camera section 51, an image as shown in FIG. 28A can be obtained.
For example, a shadow of the camera section 51 may appear on an image shot by the camera section 51 by some directions of a light or the like in a room on which the imaging apparatus is placed. In this case, as shown in FIG. 27B, the camera section 51 is placed obliquely upward on the original, not directly overhead of the original. When the camera section 51 is placed in such way, and the original placed on the original stage 53 is shot, an image as shown in FIG. 28B can be obtained.
The imaging apparatus generates an image, corresponding to the original as shown in FIG. 28C, from the shot image shown in FIG. 28A or 28B. Like this case, when the image including the original and obtained through shooting is distorted, the imaging apparatus performs a Keystone Correction (trapezoidal distortion correction). The Keystone correction features to clip an image corresponding to the original from the shot image such as shown in FIG. 28A or 28B, and converts the image in such a way that a trapezoid represented by the outline of the clipped image is to be a rectangular.
When the original is an oblong, the imaging apparatus acquires projection correction parameter from four of the apex coordinates of the outline of the extracted image which includes the original. Using the projection correction parameter, the imaging apparatus performs the projection correction. The projection correction converts an image of an object, shot from a spatial oblique direction, into an image to be obtained in shooting from the front. As mentioned, the conventional imaging apparatus acquires the projection correction parameter on the assumption that the oblong original entirely appears within the shooting range of the camera, and the straight line corresponding to the outline of the original is detectable.
If a portion of the original is out from the shooting range, the imaging apparatus cannot correctly acquires the outline of the original, thereby failing to acquire a correct projection correction parameter. As shown in FIG. 29A, if a portion of the original is warped, the shape of the original shot by the camera does not become an oblong, and the imaging apparatus cannot acquire a correct projection correction parameter. That is, the imaging apparatus is to acquire the shape of the original based on an incorrectly detected outline 2901.
For example, when carrying out projection correction using the image of the original whose portion is warped, the imaging apparatus cannot correctly acquire a straight line which corresponds to the warped portion. Accordingly, in performing projection correction and a Keystone correction on that image, as shown in FIG. 29B, the image of the original is distorted.
As mentioned, in the conventional technique, as the projection correction parameter is acquired by detecting a straight line or an apex represented by the outline of the original itself, an accurate projection correction cannot be performed.